//
//  SetInfoModel.m
//  HaoHint
//
//  Created by winter on 16/5/26.
//  Copyright © 2016年 wd. All rights reserved.
//

#import "SetInfoModel.h"

@implementation SetInfoModel

- (void)setSoundName:(NSString *)soundName
{
    _soundName = soundName;
    self.cellTitle = soundName;
    if ([soundName isEqualToString:@"系统默认"]) {
        _soundName = nil;
    }
}

- (void)setRemindMinutes:(NSInteger)remindMinutes
{
    _remindMinutes = remindMinutes;
    
    if (remindMinutes < 0) {
        self.cellTitle = @"无";
    }
    else if (remindMinutes == 0) {
        self.cellTitle = @"结束时提醒";
    }
    else if (remindMinutes > 30) {
        self.cellTitle = @"1小时前";
    }
    else {
        self.cellTitle = [NSString stringWithFormat:@"%ld分钟前",(long)remindMinutes];
    }
}
@end
